feat: add copyright check functionality#21
Open
qxp930712 wants to merge 1 commit intozccrs:masterfrom
Open
Conversation
600e9ec to
7e908d2
Compare
Added copyright check module that automatically verifies copyright and license headers in staged files during commit process. The system checks for copyright notices, validates copyright years, and ensures license declarations are present. For new files, it examines staged content while for modified files it checks working directory content. Users are prompted to confirm continuation if copyright issues are detected. The implementation includes file type detection, content extraction from git staging area, and comprehensive copyright pattern matching. Uses chrono crate for current year comparison to ensure copyright dates are up-to-date. Log: Added automated copyright checking during commit process Influence: 1. Test copyright check with files containing valid copyright headers 2. Verify detection of missing copyright notices in new files 3. Test copyright year validation with outdated years 4. Check license declaration detection for various license types 5. Verify user prompt behavior when copyright issues are found 6. Test skip functionality when using amend mode 7. Validate file type detection for different file extensions 8. Test content extraction from both staged and working directory files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added copyright check module that automatically verifies copyright and license headers in staged files during commit process. The system checks for copyright notices, validates copyright years, and ensures license declarations are present. For new files, it examines staged content while for modified files it checks working directory content. Users are prompted to confirm continuation if copyright issues are detected.
The implementation includes file type detection, content extraction from git staging area, and comprehensive copyright pattern matching. Uses chrono crate for current year comparison to ensure copyright dates are up-to-date.
Log: Added automated copyright checking during commit process
Influence: